//
// Created by Administrator on 2025/6/15.
//

#include "system_config.h"
#include "board_config.h"

#define SYSTEM_CONFIG_MAGIC 0x12345678

static SYSTEM_CONFIG_T system_config = {
        .magic = SYSTEM_CONFIG_MAGIC,
        .dhcp_enabled = 1,
};

void system_config_init(void) {
    system_config.ip.addr = ipaddr_addr(BOARD_IP);
    system_config.netmask.addr = ipaddr_addr(BOARD_NETMASK);
    system_config.gateway.addr = ipaddr_addr(BOARD_GATEWAY);
}

SYSTEM_CONFIG_T *system_config_get(void) {
    return &system_config;
}

void system_config_save(void) {

}

